/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mycity.dao;


/**
 *
 * @author celikeins
 */
public class PostTab {

    private Long userId;
    private Long postId;
    private Long postType;
    private String postDate;
    private String postContent;
    private String[] tags;
    private Long locId;
    private String locName;
    private String picId;

    public String getPicId() {
        return picId;
    }

    public void setPicId(String picId) {
        this.picId = picId;
    }

    
    
    
    public String getLocName() {
        return locName;
    }
    
    public void setLocName(String locName) {
        this.locName = locName;
    }

    public Long getLocId() {
        return locId;
    }

    public void setLocId(Long locId) {
        this.locId = locId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getPostId() {
        return postId;
    }

    public void setPostId(Long postId) {
        this.postId = postId;
    }

    public Long getPostType() {
        return postType;
    }

    public void setPostType(Long postType) {
        this.postType = postType;
    }

    public String getPostDate() {
        return postDate;
    }

    public void setPostDate(String postDate) {
        this.postDate = postDate;
    }

    public String getPostContent() {
        return postContent;
    }

    public void setPostContent(String postContent) {
        this.postContent = postContent;
    }

    public PostTab(Long userId, Long postId, Long postType, String postDate, String postContent,String[] tags,Long locId,String locationName) {
        this.userId = userId;
        this.postId = postId;
        this.postType = postType;
        this.postDate = postDate;
        this.postContent = postContent;
        this.tags=tags;
        this.locId=locId;
        if(postType==2){
            int idx=postContent.indexOf('|');
            if(idx>=0){
                this.picId=postContent.substring(idx+1);
                this.postContent=postContent.substring(0,idx);
            }
        }
        this.locName=locationName;
    }

    public String[] getTags() {
        return tags;
    }

    public void setTags(String[] tags) {
        this.tags = tags;
    }
    
         
    
}
